﻿
// CompactFlashWriterDlg.h: 头文件
//

#pragma once
#include "DiskManager.h"
#include "FloppyDisk.h"

// CCompactFlashWriterDlg 对话框
class CCompactFlashWriterDlg : public CDialogEx
{
// 构造
public:
	CCompactFlashWriterDlg(CWnd* pParent = nullptr);	// 标准构造函数

	virtual void OnOK() override;
	virtual void OnCancel() override;

// 对话框数据
#ifdef AFX_DESIGN_TIME
	enum { IDD = IDD_COMPACTFLASHWRITER_DIALOG };
#endif

protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV 支持
	void EnableUI(BOOL enabled);

// 实现
protected:
	HICON m_hIcon;

	// 生成的消息映射函数
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnClose();
	afx_msg void OnBnClickedButtonBrowse();
	afx_msg void OnBnClickedButtonFlash();
	afx_msg void OnBnClickedCheckMbr();
	afx_msg void OnCbnSelchangeComboMedia();
	DECLARE_MESSAGE_MAP()
public:
	// Disk drive list
	CComboBox m_diskDriveList;

	// Disk management toolkit
	DiskManager m_diskManager;

	// Image file path
	CString m_pszImageFilePath;

	// Sectors per track
	UINT m_nSectorPerTrack;

	// Sector size combobox
	CComboBox m_ctrlComboSectorSize;

	// Track count of disk
	UINT m_nTracks;

	// Track number when writing starts
	UINT m_nTrackStart;

	// Sector number when writing starts
	UINT m_nSectorStart;

	// Write to 0 block
	BOOL m_bMBR;

	// Disk size
	CString m_szDiskSize;
};
